﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
              int a = 0;
              int b = 0;
            string s = "sdhb f sdni9 gfiosa djdgii dmfpos dfgoidih gdfgn dfassswf fjssg"; 
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i].Equals('s'))
                {
                    a++;
                }
                if (s[i].Equals('i'))
                {
                    b++;
                }
            }
            //foreach (var item in s)
            //{
            //    if (item=='s')
            //    {
            //        a++;
            //    }
            //    if (item=='i')
            //    {
            //        b++;
            //    }
            //}
            Console.WriteLine($"{a}");
            Console.WriteLine($"{b}");
            //string s1 = s.Replace("s", "");
            //string s2= s.Replace("i", "");
            //int c = s.Length - s1.Length;
            //int e = s.Length - s2.Length;
            //Console.WriteLine($"{c}");
            //Console.WriteLine($"{e}");
            char[] s1 = { 's' };
            string[] s11 = s.Split(s1);
            int c = s11.Length - 1;
            Console.WriteLine(c);
            char[] s2 = { 'i' };
            string[] s22 = s.Split(s2);
            int d = s22.Length - 1;
            Console.WriteLine(d);

            string ss = s.Replace(" ", "");
            int e = s.Length - ss.Length;
            Console.WriteLine(ss);
            Console.WriteLine(e);
        }
    }
}
